package com.mike.service;

import com.mike.common.ServerResponse;
import com.mike.pojo.Category;

import java.util.List;

/**
 * Created by HP on 2018/3/3.
 */
public interface ICategoryService {

    /**
     * 追加目录
     * param categoryName
     * param parentId
     * return
     */
    ServerResponse addcategory(String categoryName,Integer parentId);


    /**
     * 修改品类名称
     * param categoryId
     * param categoryName
     * return
     */
    ServerResponse updateCategoryName(Integer categoryId, String categoryName);

    /**
     * 获得平级子节点
     * param categoryId
     * return
     */
    ServerResponse<List<Category>> getChildrenParallelCategory(Integer categoryId);

    /**
     * 获得节点本身及递归子节点集合
     * param categoryId
     * return
     */
    ServerResponse<List<Integer>> selectCategoryAndChildrenById(Integer categoryId);


}
